from django.urls import path


from book.views import *
urlpatterns=[
    # path('books/',BookListAPIView.as_view()),
    # path('bookss/',BookInfoGenericAPIView.as_view()),
    # path('bookss/<id>/',BookInfoDetailGenericAPIView.as_view()),
    # path('booksss/',BookInfoGenericMixinAPIView.as_view()),
    # path('booksss/<id>',BookInfoDetailGenericMixinAPIVIiew.as_view()),
    # path('bookssss/',BookInfoListCreaetAPIView.as_view()),
    # path('bookssss/<id>',BookInfoDetailListCreaetAPIView.as_view()),
]

# 视图集
from rest_framework.routers import DefaultRouter,SimpleRouter
from book import views

# router = SimpleRouter()
router = DefaultRouter()
router.register(prefix='book',viewset=views.BookInfoModelViewSet,basename='book')

aaa = DefaultRouter()
aaa.register('people',views.PeopleInfoModelViewSet,basename='people')


urlpatterns+=router.urls
urlpatterns+=aaa.urls